package insight.google.game.era.bo.policy.character;

import insight.google.game.era.bo.GameRoom;
import insight.google.game.era.bo.GameUser;
import insight.google.game.era.bo.card.GameCard;
import insight.google.game.era.core.Util;

import java.util.Map;

public class CaoCaoPolicy extends CharacterPolicy {

	

	public CaoCaoPolicy(String id, String name){
		super(id, name);
	}

	@Override
	public boolean beHurtedExec(GameUser original, GameUser[] targets,
			Map params) {
		// TODO Auto-generated method stub
		String cardName= (String)params.get("hurtCard");
		GameRoom room = Util.getRoom();
		GameCard card = room.getCardByCardName(cardName);
		//add same type card to original user
        for(int i=0; i<targets.length; i++){
            GameUser tagUser = targets[i];
            room.sendCardToUserByCardName(tagUser, cardName);
        }
		return true;
	}

	@Override
	public boolean beSelectedExec(GameUser original, GameUser[] targets,
			Map params) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean onDiscardExec(GameUser original, GameUser[] targets,
			Map params) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean onTurnExec(GameUser original, GameUser[] targets, Map params) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean withDiscardExec(GameUser original, GameUser[] targets,
			Map params) {
		// TODO Auto-generated method stub
		return false;
	}



}
